# makefile

APP=demo
CC=g++

EFLAGS= -DRUN_ENVIRONMENT_LINUX
SFLAGS= -DCHINESE_SUPPORT -DMOUSE_SUPPORT -DRESMGT_SUPPORT
DFLAGS= -DMODE_DEBUG
IFLAGS= -I/usr/include/X11
CFLAGS= -O0 -m64
FLAGS = $(EFLAGS) $(SFLAGS) $(DFLAGS) $(IFLAGS) $(CFLAGS)
LFLAGS= -lX11

VPATH= .
SRCS = $(wildcard $(VPATH)/*.cpp)
OBJS = $(patsubst %.cpp, %.o, $(SRCS))
LIBS = ../MonoGUI/monogui.a

$(APP): $(OBJS) $(LIBS)
	$(CC) -o $(APP) $(OBJS) $(LIBS) $(LFLAGS)
	cp $(APP) ../

%.o: %.cpp
	$(CC) $(FLAGS) -c $<

clean:
	rm $(notdir $(OBJS)) -f
	rm $(APP) -f
	rm *~ -f

# END